From 14b466f28affe2ee70c22e5bfd6a5bcfc5e18f9f Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sat, 23 Mar 2024 17:27:35 -0500 Subject: [PATCH] Customize tests fixture name to confirm with template target name --- .../TEMPLATE/tests/views/test_TEMPLATE.py.mak | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pgwui_develop/TEMPLATE/tests/views/test_TEMPLATE.py.mak b/src/pgwui_develop/TEMPLATE/tests/views/test_TEMPLATE.py.mak index ea99f12..a1bfb8c 100644 --- a/src/pgwui_develop/TEMPLATE/tests/views/test_TEMPLATE.py.mak +++ b/src/pgwui_develop/TEMPLATE/tests/views/test_TEMPLATE.py.mak @@ -72,10 +72,10 @@ class MockUploadEngine(): # Fixtures @pytest.fixture -def isolate_upload_view(monkeypatch, pyramid_request_config): +def isolate_${short_name}_view(monkeypatch, pyramid_request_config): '''Keep upload_view() from calling anything - Also, have isolate_upload_view(response) + Also, have isolate_${short_name}_view(response) cause UploadEngine to return the supplied "response". ''' def run(response): @@ -101,12 +101,12 @@ def isolate_upload_view(monkeypatch, pyramid_request_config): # ${short_name}_view() @pytest.fixture -def return_log_tuples(isolate_upload_view, caplog): +def return_log_tuples(isolate_${short_name}_view, caplog): '''Get result and the caplog.record_tuples from the upload_view() call''' caplog.set_level(logging.DEBUG) def run(response): - isolate_upload_view(response) + isolate_${short_name}_view(response) result = ${short_name}.${short_name}_view(get_current_request()) del result['pgwui'] # Remove variables added by pgwui view decorators -- 2.34.1